home *** CD-ROM | disk | FTP | other *** search
/ Aminet 43 / Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso / Aminet / comm / tcp / smbfs.lha / source / smb_abstraction.h < prev    next >
C/C++ Source or Header  |  2000-12-03  |  2KB  |  61 lines

  1. /*
  2.  * $Id: smb_abstraction.h 1.12 2000/12/03 13:50:10 olsen Exp olsen $
  3.  *
  4.  * :ts=8
  5.  *
  6.  * Name: smb_abstraction.h
  7.  * Description: Interface to the smb abstraction layer.
  8.  * Author: Christian Starkjohann <cs@hal.kph.tuwien.ac.at>
  9.  * Date: 1996-12-31
  10.  * Copyright: GNU-GPL
  11.  *
  12.  * Modified for use with AmigaOS by Olaf Barthel <olsen@sourcery.han.de>
  13.  */
  14.  
  15. typedef struct smba_connect_parameters
  16. {
  17.   char server_ipname[64];
  18.   char service[64];
  19.   char *server_name;
  20.   char *client_name;
  21.   char *username;
  22.   char *password;
  23.   int max_xmit;
  24. } smba_connect_parameters_t;
  25.  
  26. typedef struct smba_stat
  27. {
  28.   unsigned is_dir:1;
  29.   unsigned is_wp:1;
  30.   unsigned is_hidden:1;
  31.   int size;
  32.   long atime;
  33.   long ctime;
  34.   long mtime;
  35. } smba_stat_t;
  36.  
  37. typedef struct smba_server smba_server_t;
  38. typedef struct smba_file smba_file_t;
  39.  
  40. typedef int (*smba_callback_t) (void *d, int fpos, int nextpos,
  41.                                 char *name, int eof, smba_stat_t * stat);
  42.  
  43. int smba_open(smba_server_t *s, char *name, smba_file_t **file);
  44. void smba_close(smba_file_t *f);
  45. int smba_read(smba_file_t *f, char *data, long len, long offset);
  46. int smba_write(smba_file_t *f, char *data, long len, long offset);
  47. int smba_getattr(smba_file_t *f, smba_stat_t *data);
  48. int smba_setattr(smba_file_t *f, smba_stat_t *data);
  49. int smba_readdir(smba_file_t *f, long offs, void *d, smba_callback_t callback);
  50. int smba_create(smba_file_t *dir, const char *name, smba_stat_t *attr);
  51. int smba_mkdir(smba_file_t *dir, const char *name);
  52. int smba_remove(smba_server_t *s, char *path);
  53. int smba_rmdir(smba_server_t *s, char *path);
  54. int smba_rename(smba_server_t *s, char *from, char *to);
  55. int smba_statfs(smba_server_t *s, long *bsize, long *blocks, long *bfree);
  56. void smb_invalidate_all_inodes(struct smb_server *server);
  57. int smba_start(char *service, char *opt_workgroup, char *opt_username, char *opt_password, char *opt_clientname, char *opt_servername, int opt_cachesize, smba_server_t **result);
  58. void smba_disconnect(smba_server_t *server);
  59. int smba_get_dircache_size(struct smba_server * server);
  60. int smba_change_dircache_size(struct smba_server * server,int cache_size);
  61.